<template>
    <a-table :columns="columns" :data-source="dataSource">
        <template #bodyCell="{ column, record, index }">
            <template v-if="column.key === 'index'">
                {{ index + 1 }}
            </template> </template>
    </a-table>
</template>
  
<script setup>
const columns = [
    {
        title: '序号',
        dataIndex: 'index',
        key: 'index',
    },
    {
        title: "付款事由",
        dataIndex: "paymentReason",
        key: "paymentReason"
    },
    {
        title: '付款额',
        dataIndex: 'paymentAmount',
        key: 'paymentAmount'
    },
    {
        title: "申请日期",
        dataIndex: "applicationDate",
        key: "applicationDate"
    }, {
        title: '审核状态',
        dataIndex: 'approvalStatus',
        key: 'approvalStatus'
    },
    {
        title: '申请人',
        dataIndex: 'applicant',
        key: 'applicant'
    }
]
const dataSource = [
    {
        "id": 1,
        "paymentReason": "1234567890",
        "paymentAmount": "增值税普通发票",
        "applicationDate": "2022-01-01",
        "approvalStatus": '新建审核通过',
        "applicant": '张三',
    }, {
        "id": 2,
        "paymentReason": "1234567890",
        "paymentAmount": "增值税普通发票",
        "applicationDate": "2022-01-01",
        "approvalStatus": '新建审核通过',
        'purchaseManager': "李四"
    }, {
        "id": 3,
        "paymentReason": "1234567890",
        "paymentAmount": "增值税普通发票",
        "applicationDate": "2022-01-01",
        "approvalStatus": '新建审核通过',
        purchaseManager: "王五"
    }
]

</script>
  
<style scoped>
/* 可以自定义样式 */
</style>